<extend name="Public/base"/>

<block name="body">
    <div style="font-size: 2px;">
            <!-- 标题栏 -->
        <!--<form method="POST" id="list" action="{:U('sellpriceexport')}">-->
            <div class="main-title">
                <h2>销售价格</h2>
            </div>
            <div class="cf">
                <div class="search-form fr cf">
                    <div class="sleft" >
                        <input type="text"  name="BIN" class=" search-input form-control " value="{:I('BIN')}" placeholder="商品编码" style="height:28px;width: 120px;" />
                    </div>
                    <div class="sleft" >
                        <input type="text"  name="pname" class=" search-input form-control " value="{:I('pname')}" placeholder="商品名称" style="height:28px;width: 120px;" />
                        <a class="sch-btn" href="javascript:;" id="search" url="{:U('')}"><i class="btn-search"></i></a>
                    </div>
                </div>
            </div>
        <!--</form>-->
        <!-- 数据列表 -->
        <div class="data-table table-striped">
            <table>
                <thead>
                    <tr>
                        <th>批次</th>
                        <th>商品名称[规格]</th>
                        <th>成本</th>
                        <th>手工费</th>
                        <th>快递费</th>
                        <th>包装费</th>
                        <th>
                            商城<span class="glyphicon glyphicon-question-sign" title="含运120%"></span>
                        </th>
                        <th>
                            果饮店<span class="glyphicon glyphicon-question-sign" title="不含运105%"></span>
                        </th>
                        <th>
                            员工<span class="glyphicon glyphicon-question-sign" title="不含运115%"></span>
                        </th>
                        <th>
                            企事业<span class="glyphicon glyphicon-question-sign" title="不含运120%"></span>
                        </th>
                        <th >
                            批发<span class="glyphicon glyphicon-question-sign" title="不含运125%"></span>
                        </th>
                        <th >
                            广源<span class="glyphicon glyphicon-question-sign" title="不含运140%"></span>
                        </th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>
                    <volist name="_list" id="vo">
                        <tr >
                            <td>
                                {$vo.batch}
                            </td>
                            <td>
                                {$vo.pname}[{$vo.BIN|get_name_by_id=###,'Material_product','BIN','spec'}]
                            </td>
                            <td>
                                {$vo.base_price}
                            </td>
                            <td>
                                {$vo.process_fee|num_round=###,2}
                            </td>
                            <td>
                                {$vo.gr_trans_fee|num_round=###,2}
                            </td>
                            <td>
                                {$vo.package_fee|num_round=###,2}
                            </td>
                            <td>
                                {$vo['spec_price_sc']}
                            </td>
                            <td>
                                {$vo['spec_price_gyd']}
                            </td>
                            <td>
                                {$vo['spec_price_yg']}
                            </td>
                            <td>
                                {$vo['spec_price_qsy']}
                            </td>
                            <td>
                                {$vo['spec_price_pf']}
                            </td>
                            <td>
                                {$vo['spec_price_gyds']}
                            </td>
                            <td>
                                <a  href="{:U('Dingjia/sellpricedel')}&id={$vo.id}" class="ajax-get confirm btn btn-danger">删除</a>
                            </td>
                        </tr>
                    </volist>
                </tbody>
            </table>
        </div>
        <div class="page">
            {$_page}
        </div>
    </div>
</block>

<block name="script">
    <script src="__STATIC__/thinkbox/jquery.thinkbox.js"></script>
    <script type="text/javascript">
        highlight_subnav('{:U(ACTION_NAME)}');
        $("#search").click(function(){
            var url = $(this).attr('url');
            var query  = $('.search-form').find('.search-input').serialize();
            query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
            query = query.replace(/^&/g,'');
            if( url.indexOf('?')>0 ){
                url += '&' + query;
            }else{
                url += '?' + query;
            }
            window.location.href = url;
        });
        //回车搜索
        $(".search-input").keyup(function(e){
            if(e.keyCode === 13){
                $("#search").click();
                return false;
            }
        });
    </script>
</block>
